<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template2.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateUsinaSituacaoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
            </h:panelGroup>

            <p:growl id="messages" life="3000"/>

            <p:panel>
                <f:facet name="header">
                    <h:outputText value="#{bundle.LegendUsinaSituacaoTitle}"/>
                </f:facet>


                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateUsinaSituacaoLabel_ussNm}" for="ussNm" />
                    <p:inputText id="ussNm" value="#{usinaSituacaoController.selected.ussNm}" title="#{bundle.CreateUsinaSituacaoTitle_ussNm}" required="true" requiredMessage="#{bundle.CreateUsinaSituacaoRequiredMessage_ussNm}"/>
                    <h:outputLabel value="#{bundle.CreateUsinaSituacaoLabel_ussDs}" for="ussDs" />
                    <p:inputText id="ussDs" value="#{usinaSituacaoController.selected.ussDs}" title="#{bundle.CreateUsinaSituacaoTitle_ussDs}" />
                </h:panelGrid>
                <br />

                <p:commandButton ajax="false" rendered="#{!autenticadorController.loginVisualizador}" icon="#{bundle.icone_salvar}" action="#{usinaSituacaoController.create}" value="#{bundle.CreateUsinaSituacaoSaveLink}" /> &nbsp;
                <p:commandButton ajax="false" action="#{usinaSituacaoController.prepareList}" icon="#{bundle.icone_listar}" value="#{bundle.CreateUsinaSituacaoShowAllLink}" immediate="true"/>
            </p:panel>

        </ui:define>
    </ui:composition>

</html>
